//author:kakake
class tsdrugdictController {
    public data = {
        dbConn: TSLobsterAPI.Program.GetDbConn(),
        WorkId: 1
    }

    public service: tsdrugdictService;
    public dao: tsdrugdictDao;

    constructor() {
        this.data.WorkId = TSLobsterAPI.Program.GetWorkId();

        this.service = new tsdrugdictService(this.data.WorkId);
        this.dao = new tsdrugdictDao(this.data.WorkId);

    }
    /**
     * 获取规格数据
     */
    getdata_spec() {
        var state = TSLobsterAPI.Program.RequestQuery('state', '0');
        var search = TSLobsterAPI.Program.RequestQuery('search', '');
        var pageInfo = {
            key: "CenteDrugID",
            page: TSLobsterAPI.Program.RequestQuery("page", "1"),
            perPage: TSLobsterAPI.Program.RequestQuery("limit", "10"),
            totalRecord: 100
        };

        TSLobsterAPI.Utils.TrackLog('getdata_spec',[state,search,pageInfo]);

        var data = this.dao.getdata_spec(state, search, pageInfo);

        var datagrid = { data: data, count: pageInfo.totalRecord };

        return datagrid;
    }
}